﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="userEdit.aspx.vb" Inherits="Administrator_userEdit"  %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">


    $(document).ready(function () {
 //       var panal = $("input[id$=PanelUser]").attr('disabled');
//        var txtStartDate_dis = $("input[id$=txtStartDate]").attr('disabled');
//        var txtEndDate_dis = $("input[id$=txtEndDate]").attr('disabled');
//        var txtPwdExpireDate_dis = $("input[id$=txtPwdExpireDate]").attr('disabled');


        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
            yearAddToDisplay: 543,
            dateFormat: 'dd/mm/yy',
            showOn: "button",
            buttonImage: "../img/calendar.gif",
            buttonImageOnly: true
        }));
        $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
            yearAddToDisplay: 543,
            dateFormat: 'dd/mm/yy',
            showOn: "button",
            buttonImage: "../img/calendar.gif",
            buttonImageOnly: true
        }));
 
        function EndRequestHandler(sender, args) { 

            $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            }));
            $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            })); 
        }


    });


       

        
       
</script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table  border="0" cellpadding="4" cellspacing="0" width="100%">
                <tr>
                    <td align="left">
                       
                        <table width="100%">
                            <tr>
                                <td align="right" valign="top" width="170" ><span style="color: #FF0000">*</span><asp:Label 
                                        ID="lblUserName" runat="server" CssClass="control" Height="20px" 
                                        style="color: #000000"></asp:Label>
                                </td>
                                <td align="left" valign="top" >
                                    <asp:TextBox ID="txtUserName" runat="server" CssClass="control" Height="20px" 
                                        Width="220px" MaxLength="20" AutoCompleteType="Disabled"></asp:TextBox>
                                    &nbsp;<asp:Button ID="btnChkEmployee" runat="server" CssClass="control" 
                                        Text="ตรวจสอบรหัสผู้ใช้งาน" Width="152px" />
                                </td>
                                <td align="left" valign="top">
                                    </td>
                            </tr>
                        </table>
                        <asp:Panel ID="PanelUser" runat="server" Enabled="false">
                           <table width="100%">
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <span style="color: #FF0000">*</span><asp:Label ID="lblFirstName" 
                                        runat="server" CssClass="control" Height="20px" Text="คำนำหน้า - ชื่อ"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:TextBox ID="txtFirstName" runat="server" CssClass="control" Height="20px" 
                                        Width="220px" MaxLength="100" AutoCompleteType="Disabled"></asp:TextBox>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                   <td align="right" valign="top" width="170">
                                       <span style="color: #FF0000">*</span><asp:Label ID="lblLastName" runat="server" 
                                           CssClass="control" Height="20px" Text="นามสกุล"></asp:Label>
                                   </td>
                                   <td align="left" valign="top">
                                       <asp:TextBox ID="txtLastName" runat="server" CssClass="control" Height="20px" 
                                           Width="220px" MaxLength="100" AutoCompleteType="Disabled"></asp:TextBox>
                                   </td>
                                   <td align="left" valign="top">
                                       &nbsp;</td>
                               </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <span style="color: #FF0000">*</span><asp:Label ID="lblDepartmentName" 
                                        runat="server" CssClass="control" style="color: #000000"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:DropDownList ID="ddlDepartment" runat="server" CssClass="control" 
                                        Height="25px" Width="225px" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    เขต</td>
                                <td align="left" valign="top">
                                    <asp:DropDownList ID="ddlZone" runat="server" AutoPostBack="True" 
                                        CssClass="control" Height="25px" Width="225px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                               <tr>
                                   <td align="right" valign="top" width="170">
                                       <span style="color: #FF0000">*</span><asp:Label ID="lblBranchName" 
                                           runat="server" CssClass="control" style="color: #000000"></asp:Label>
                                   </td>
                                   <td align="left" valign="top">
                                       <asp:DropDownList ID="ddlBranch" runat="server" AutoPostBack="True" 
                                           CssClass="control" Height="25px" Width="225px">
                                       </asp:DropDownList>
                                   </td>
                                   <td align="left" valign="top">
                                       &nbsp;</td>
                               </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <span style="color: #FF0000">*</span><asp:Label ID="lblRoleGroup" runat="server" CssClass="control" Height="20px" 
                                        Text="ระดับการเข้าถึงข้อมูล"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:DropDownList ID="ddlRoleGroup" runat="server" CssClass="control" 
                                        Height="25px" Width="226px" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                               <tr>
                                   <td align="right" valign="top" width="170">
                                       <span style="color: #FF0000">*</span><asp:Label ID="lblUserRight" 
                                           runat="server" CssClass="control" style="color: #000000"></asp:Label>
                                   </td>
                                   <td align="left" valign="top">
                                       <asp:DropDownList ID="ddlUserRight" runat="server" CssClass="control" 
                                           Height="25px" Width="225px">
                                       </asp:DropDownList>
                                   </td>
                                   <td align="left" valign="top">
                                       &nbsp;</td>
                               </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <asp:Label ID="lblIsInactive" runat="server" CssClass="control"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:RadioButtonList ID="rdolIsInactive" runat="server" CssClass="control" 
                                        Height="20px" RepeatDirection="Horizontal" Width="350px">
                                        <asp:ListItem Selected="True" Value="0">0</asp:ListItem>
                                        <asp:ListItem Value="1">1</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <span><span style="color: #FF0000">* </span>
                                    <asp:Label ID="lblPassword" runat="server" CssClass="control" 
                                        style="color: #000000"></asp:Label>
                                    </span>
                                </td>
                                <td align="left" valign="top">
                                    <asp:TextBox ID="txtPassword" runat="server" CssClass="control" Height="20px" 
                                        TextMode="Password" Width="220px" AutoCompleteType="Disabled"></asp:TextBox>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <span style="color: #FF0000">*</span><asp:Label ID="lblRePassword" 
                                        runat="server" CssClass="control" style="color: #000000"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:TextBox ID="txtRePassword" runat="server" CssClass="control" Height="20px" 
                                        TextMode="Password" Width="220px" AutoCompleteType="Disabled"></asp:TextBox>
                                    <asp:Button ID="btnReset" runat="server" CssClass="control" Text="Reset" 
                                        Width="68px" style="height: 26px" />
                                    <asp:HiddenField ID="hdfChangePwd" runat="server" />
                                </td>
                                <td align="left" valign="top">
                                  
                                    <br />
                                   
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    &nbsp;</td>
                                <td align="left" valign="top">
                                    <asp:CheckBox ID="chkMustChangePwd" runat="server" CssClass="control" 
                                        Text="เปลี่ยนรหัสผ่านหลังจาก Login ครั้งต่อไป" Checked="True" />
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                               <tr>
                                   <td align="right" valign="top" width="170">
                                       &nbsp;</td>
                                   <td align="left" valign="top">
                                       <asp:CheckBox ID="chkApproveRight" runat="server" CssClass="control" 
                                           Text="สิทธิ์ในการอนุมัติ" />
                                   </td>
                                   <td align="left" valign="top">
                                       &nbsp;</td>
                               </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <asp:Label ID="lblIsPwdLock" runat="server" CssClass="control"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:RadioButtonList ID="rdolIsPwdLock" runat="server" CssClass="control" 
                                        Height="20px" RepeatDirection="Horizontal" Width="350px" 
                                        AutoPostBack="True">
                                        <asp:ListItem Selected="True" Value="0"></asp:ListItem>
                                        <asp:ListItem Value="1"></asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px" valign="top" width="170">
                                    <asp:Label ID="lblIsPwdExpire" runat="server" CssClass="control"></asp:Label>
                                </td>
                                <td align="left" style="height: 30px" valign="top">
                                    <asp:RadioButtonList ID="rdolIsPwdExpire" runat="server" CssClass="control" 
                                        Height="20px" RepeatDirection="Horizontal" Width="350px" 
                                        AutoPostBack="True">
                                        <asp:ListItem Selected="True" Value="0"></asp:ListItem>
                                        <asp:ListItem Value="1"></asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td align="left" style="height: 30px" valign="top">
                                </td>
                            </tr>
                            <tr valign="top">
                                <td align="right" valign="top" width="170" style="height: 24px">
                                    <asp:Label ID="lblPwdExpireDate" runat="server" CssClass="control"></asp:Label>
                                </td>
                                <td align="left" valign="top" style="height: 24px">
                                    <asp:TextBox ID="txtPwdExpireDate" runat="server" CssClass="control" 
                                        Height="20px" Width="200px" AutoCompleteType="Disabled" Enabled="False" 
                                        ReadOnly="True"></asp:TextBox>
                                    <asp:TextBox ID="txtPwdExpireDate0" runat="server" CssClass="control" 
                                        Height="20px" Visible="False" Width="200px" AutoCompleteType="Disabled"></asp:TextBox>
                                </td>
                                <td align="left" valign="top" style="height: 24px">
                                    </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="170">
                                    <asp:Label ID="lblIsUserExpire" runat="server" CssClass="control"></asp:Label>
                                </td>
                                <td align="left" valign="top">
                                    <asp:RadioButtonList ID="rdolIsUserExpire" runat="server" CssClass="control" 
                                        Height="20px" RepeatDirection="Horizontal" Width="350px" 
                                        AutoPostBack="True">
                                        <asp:ListItem Selected="True" Value="0"></asp:ListItem>
                                        <asp:ListItem Value="1"></asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                            </tr>
                            <tr valign="top">
                                   <td align="right" valign="top" width="170">
                                       <asp:Label ID="lblStartDate" runat="server" CssClass="control" Height="20px" 
                                           Text="วันที่เริ่มใช้งาน"></asp:Label>
                                   </td>
                                   <td align="left" valign="top">
                                       <asp:TextBox ID="txtStartDate" runat="server" CssClass="control" Height="20px" 
                                           Width="200px" AutoCompleteType="Disabled"></asp:TextBox>
                                       <asp:Label ID="lblRoleGroup1" runat="server" CssClass="control" Height="20px" 
                                           Text="วันที่สิ้นสุด"></asp:Label>
                                       <asp:TextBox ID="txtEndDate" runat="server" CssClass="control" Height="20px" 
                                           Width="200px" AutoCompleteType="Disabled"></asp:TextBox>
                                       <asp:TextBox ID="txtStartDate0" runat="server" CssClass="control" Height="20px" 
                                           Width="200px" AutoCompleteType="Disabled"></asp:TextBox>
                                       <asp:Label ID="lblRoleGroup2" runat="server" CssClass="control" Height="20px" 
                                           Text="วันที่สิ้นสุด"></asp:Label>
                                       <asp:TextBox ID="txtEndDate0" runat="server" CssClass="control" Height="20px" 
                                           Width="200px" AutoCompleteType="Disabled"></asp:TextBox>
                                   </td>
                                   <td align="left" valign="top">
                                      </td>
                               </tr>
                            </table>
                        </asp:Panel>
                        <table width="100%">
                            <tr>
                                <td align="right" valign="top">
                                    &nbsp;</td>
                                <td align="left" valign="top">
                                    &nbsp;</td>
                                <td align="left" valign="top" style="text-align: right">
                                    <asp:Button ID="btnOK" runat="server" CssClass="control" Text="บันทึก" 
                                        Width="60px" />
                                    <asp:Button ID="btnCancel" runat="server" CssClass="control" Text="ยกเลิก" 
                                        Width="60px" />
                                </td>
                            </tr>
                        </table>

                        
                         


                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

